<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Happy dong
 * Created Time: 2019-08-11 15:42
 *
 * Version: 2.0
 */

namespace App\Modules\System\Repositories;


use App\Models\AuthRule;
use Flower\Core\Repository\Eloquent\BaseRepository;

class AuthRuleRepository extends BaseRepository
{
	public function model()
	{
		return AuthRule::class;
	}

	/**
	 * 根据规则查询
	 * @param $rule
	 * @return mixed
	 */
	public function getByRule($rule){
		return $this->findByField('content',$rule)->first();
	}
}